package com.sicnu.cheer.generalmodule.activity;

import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;

import com.sicnu.cheer.generalmodule.R;
import com.sicnu.cheer.generalmodule.config.AppManager;

import butterknife.ButterKnife;
import cn.bmob.v3.Bmob;

/**
 * Created by Cheer on 2017/2/17
 * 基类Activity
 */

public abstract class BaseActivity extends AppCompatActivity {
    protected BaseActivity mThis;

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(getContentViewId());
        mThis = this;
        ButterKnife.inject(this);
        AppManager.getAppManager().addActivity(this);
        initView();
        initData();
        afterViews();
    }
    //初始化视图
    protected void initView(){

    }

    //初始化数据
    protected void initData(){

    }

    //初始化完成之后
    protected void afterViews(){

    }

    public abstract int getContentViewId();

}
